import {path as studentPath} from './controllers/studentCotroller.js'
import {path as uploadPath} from './controllers/upload.js'
import {path as DemandPath1} from './controllers/pageController1.js'
import {path as DemandPath2} from './controllers/pageController2.js'
import { pathUser as user } from './controllers/userController3.js'
import { path as DemandPath3} from './controllers/pageController3.js'

const pathMap = new Map();
for (let [k, v] of studentPath) {
  if (pathMap.has(k)){
    throw new Error(`url path 异常 url: ${k}!`);
  }
  pathMap.set(k, v);
}

for (let [k, v] of uploadPath) {
  if (pathMap.has(k)){
    throw new Error(`url path 异常 url: ${k}!`);
  }
  pathMap.set(k, v);
}


for (let [k, v] of DemandPath1) {
  if (pathMap.has(k)){
    throw new Error(`url path 异常 url: ${k}!`);
  }
  pathMap.set(k, v);
}

for (let [k, v] of DemandPath2) {
  if (pathMap.has(k)){
    throw new Error(`url path 异常 url: ${k}!`);
  }
  pathMap.set(k, v);
}


for (let [k, v] of DemandPath3) {
  if (pathMap.has(k)){
    throw new Error(`url path 异常 url: ${k}!`);
  }
  pathMap.set(k, v);
}


for (let [k, v] of user) {
  if (pathMap.has(k)){
    throw new Error(`url path 异常 url: ${k}!`);
  }
  pathMap.set(k, v);
}
// module.exports = pathMap;  // es5

/**
 * 修改为es6
 */
export {pathMap}